﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WriterStars.Model;

namespace WriterStars.Models.ViewModels
{
    public class ContestBookViewModel
    {
        public ContestBookViewModel(ContestBook book, Like like = null)
        {
            this.Id = book.Id;
            this.Book = book.Book;
            this.ContestId = book.ContestId;
            this.Like = like != null ? (int)like.Status : 0;
        }

        public int Id { get; set; }

        public Book Book { get; set; }

        public int ContestId { get; set; }

        public int Like { get; set; }
    }
}
